<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的账号</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.3/weui.min.css">
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        body {
            background-color: #f8f8f8;
        }
        .unit {
                display: block;
                color: #999;
                font-size: 11px;
            }
    </style>
</head>
<body>
<div class="page">
    <div class="weui-cells__title">基本信息</div>
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
            <div class="weui-cell__bd">
                <input id="name" class="weui-input" type="text" placeholder="请输入姓名" value="">
            </div>
        </div>
        <div class="weui-cell weui-cell_select weui-cell_select-after">
            <div class="weui-cell__hd">
                <label for="" class="weui-label">性别</label>
            </div>
            <div class="weui-cell__bd">
                <select id="sex" class="weui-select">
                    <option value="男">男</option>
                    <option value="女">女</option>
                </select>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">身份证号码</label></div>
            <div class="weui-cell__bd">
                <input id="idNumber" class="weui-input" type="text" placeholder="请输入身份证号码" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label for="" class="weui-label">出生日期</label></div>
            <div class="weui-cell__bd">
                <input id="birthday" class="weui-input" type="date" value=""/>
            </div>
        </div>
    </div>

    <div class="weui-cells__title">联络信息</div>
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">手机</label></div>
            <div class="weui-cell__bd">
                <input id="phone" class="weui-input" type="text" placeholder="请输入手机" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">紧急联系人</label></div>
            <div class="weui-cell__bd">
                <input id="emergencyContactOne" class="weui-input" type="text" placeholder="请输入紧急联系人" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd" style="vertical-align: top;"><label class="weui-label">家庭住址</label></div>
            <div class="weui-cell__bd">
                <textarea id="address" class="weui-textarea" placeholder="请输入家庭住址" rows="3"></textarea>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">邮编</label></div>
            <div class="weui-cell__bd">
                <input id="zipCode" class="weui-input" type="text" placeholder="请输入邮编" value="">
            </div>
        </div>
    </div>

    <div class="weui-cells__title">就诊信息</div>
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell weui-cell_select weui-cell_select-after">
            <div class="weui-cell__hd">
                <label for="" class="weui-label">就诊医院</label>
            </div>
            <div class="weui-cell__bd">
                <select id="visitHospital" class="weui-select">
                    <option value="上海市第六人民医院">上海市第六人民医院</option>
                    <option value="北京协和医院">北京协和医院</option>
                    <option value="北京西苑中医院">北京西苑中医院</option>
                    <option value="北京朝阳医院">北京朝阳医院</option>
                </select>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">主治医生</label></div>
            <div class="weui-cell__bd">
                <input id="visitDoctor" class="weui-input" type="text" placeholder="请输入主治医生" value="">
            </div>
        </div>
    </div>

    <div class="weui-cells__title">就诊情况</div>
    <div class="weui-cells weui-cells_radio">
        <label class="weui-cell weui-check__label" for="a11">
            <div class="weui-cell__bd">
                <p>初诊</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" class="weui-check" name="radio2" id="a11" checked="checked">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="a12">
            <div class="weui-cell__bd">
                <p>复诊</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radio2" class="weui-check" id="a12">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
    </div>

    <div class="weui-cells__title">症状</div>
    <div class="weui-cells weui-cells_checkbox">
        <label class="weui-cell weui-check__label" for="zz11">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz11">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>无症状</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz12">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz12">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>头痛头晕</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz13">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz13">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>恶心呕吐</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz14">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz14">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>眼花耳鸣</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz15">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz15">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>呼吸困难</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz16">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz16">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>心悸胸闷</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz17">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz17">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>鼻孔出血</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz18">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz18">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>四肢发麻</p>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="zz19">
            <div class="weui-cell__hd">
                <input type="checkbox" name="checkboxzz1" class="weui-check" id="zz19">
                <i class="weui-icon-checked"></i>
            </div>
            <div class="weui-cell__bd">
                <p>下肢水肿</p>
            </div>
        </label>
    </div>

    <div class="weui-cells__title">体征</div>
    <div class="weui-cells weui-cells_form">
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">收缩压 <span class="unit">mmHg</span></label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" placeholder="请输入收缩压" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">舒张压 <span class="unit">mmHg</span></label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" placeholder="请输入舒张压" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">体重 <span class="unit">kg</span></label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" placeholder="请输入体重" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">身高 <span class="unit">cm</span></label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" placeholder="请输入身高" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">体质指数BMI</label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" placeholder="请输入体质指数BMI" value="">
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__hd"><label class="weui-label">心率 <span class="unit">次/分</span></label></div>
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" placeholder="请输入心率" value="">
            </div>
        </div>
    </div>

    <div class="weui-cells__title">是否长期吸烟</div>
    <div class="weui-cells weui-cells_radio">
        <label class="weui-cell weui-check__label" for="xy11">
            <div class="weui-cell__bd">
                <p>否</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioxy1" class="weui-check" id="xy11" checked="checked">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="xy12">
            <div class="weui-cell__bd">
                <p>是</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioxy1" class="weui-check" id="xy12">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
    </div>

    <div class="weui-cells__title">是否长期酗酒</div>
    <div class="weui-cells weui-cells_radio">
        <label class="weui-cell weui-check__label" for="xj11">
            <div class="weui-cell__bd">
                <p>否</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioxj1" class="weui-check" id="xj11" checked="checked">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="xj12">
            <div class="weui-cell__bd">
                <p>是</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioxj1" class="weui-check" id="xj12">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
    </div>

    <div class="weui-cells__title">用药情况</div>
    <div class="weui-cells weui-cells_radio">
        <label class="weui-cell weui-check__label" for="yy11">
            <div class="weui-cell__bd">
                <p>未用药/不清楚</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioyy1" class="weui-check" id="yy11" checked="checked">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="yy12">
            <div class="weui-cell__bd">
                <p>口服单药</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioyy1" class="weui-check" id="yy12">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="yy13">
            <div class="weui-cell__bd">
                <p>联合用药</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioyy1" class="weui-check" id="yy13">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <input class="weui-input" type="text" placeholder="请输入药物名称（非必填）" value="">
            </div>
        </div>
    </div>

    <div class="weui-cells__title">用药频率</div>
    <div class="weui-cells weui-cells_radio">
        <label class="weui-cell weui-check__label" for="pl11">
            <div class="weui-cell__bd">
                <p>每日1次</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radiopl1" class="weui-check" id="pl11">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="pl12">
            <div class="weui-cell__bd">
                <p>每日2次</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radiopl1" class="weui-check" id="pl12">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="pl13">
            <div class="weui-cell__bd">
                <p>每日3次</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radiopl1" class="weui-check" id="pl13">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="pl14">
            <div class="weui-cell__bd">
                <p>不清楚</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radiopl1" class="weui-check" id="pl14" checked="checked">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
    </div>

    <div class="weui-cells__title">服药依从性</div>
    <div class="weui-cells weui-cells_radio">
        <label class="weui-cell weui-check__label" for="yc11">
            <div class="weui-cell__bd">
                <p>规律</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioyc1" class="weui-check" id="yc11" checked="checked">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="yc12">
            <div class="weui-cell__bd">
                <p>间断</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioyc1" class="weui-check" id="yc12">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="yc13">
            <div class="weui-cell__bd">
                <p>不服药</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radioyc1" class="weui-check" id="yc13">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
    </div>

    <div class="weui-cells__title">并发症情况</div>
    <div class="weui-cells weui-cells_radio">
        <label class="weui-cell weui-check__label" for="b11">
            <div class="weui-cell__bd">
                <p>有慢性并发症</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radio3" class="weui-check" id="b11" checked="checked">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="b12">
            <div class="weui-cell__bd">
                <p>有急性并发症</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radio3" class="weui-check" id="b12">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
        <label class="weui-cell weui-check__label" for="b13">
            <div class="weui-cell__bd">
                <p>无并发症</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" name="radio3" class="weui-check" id="b13">
                <span class="weui-icon-checked"></span>
            </div>
        </label>
    </div>


    <div class="weui-btn-area">
        <a class="weui-btn weui-btn_primary" href="javascript:" onclick="save(this)">确定</a>
    </div>
</div>
</body>
<script>
    function save() {
        var data ={};
        data.username = $('#name').val()
        data.idNumber = $('#idNumber').val()
        data.birthday = $('#birthday').val()
        data.visitHospital = $('#visitHospital').val()
        data.visitDoctor = $('#visitDoctor').val()
        data.phone = $('#phone').val()
        data.emergencyContactOne = $('#emergencyContactOne').val()
        data.emergencyContactTwo = $('#emergencyContactTwo').val()
        data.address = $('#address').val()
        data.zipCode = $('#zipCode').val()
        data.sex = $("select[name='sex']").val()
        $.ajax({
            type: "POST",
            url: "http://patient-demo.huimeimt.cn:8080/myAccount/insertAccountInfo",
            data: JSON.stringify(data),
            dataType: 'json',
            contentType: 'application/json',
            success: function (data) {
                console.log(data)
                location.href="./indexMy.html";
            },
        });
    }
</script>
</html>